Showing posts with label Microsoft App-V. Show all posts

Get App-V 5.0 Command Line Hook Switch with PowerShell

The App-V 5.0 Command Line Hook Switch can be used to allow local applications to run inside an App-V Virtual Environment. This way packaged applications, such as a sequenced browser plug-in, can interact with locally installed applications, such as Internet Explorer.

Assembling the Command Line Hook Switch can be tricky because it requires you to retrieve the package GUID and version GUID and concatenate them with an underscore in between. The full format looks like this: /appvve:<PACKAGEGUID_VERSIONGUID>.

To do this quickly, you can copy and run this single line of Powershell code:

$AppName = Read-Host "Enter package name"; If($AppVClientPackage = Get-AppVClientPackage $AppName) { Write-Host ("App-V Command Line Hook Switch:`n/appvve:" + $AppVClientPackage.PackageId + "_" + $AppVClientPackage.VersionId) } Else { Write-Host "Package not found." }


Result


Powershell Script to assemble the App-V Command Line Hook Switch

Copy the last line of the output and add it as a parameter to your application shortcut.

For more information about the App-V Command Line Hook Switch see the following article: How to launch processes inside the App-V 5.0 virtualized environment (KB2848278)

[Fixed] Error Adding Microsoft App-V 5.0 SP2 packages to RES Workspace Manager 2012 SR4

Adding App-V packages that were sequenced in Microsoft App-V 5.0 SP2 into RES Workspace Manager 2012 SR4 (9.7.4.0) results in the following error messages being displayed:

An Error occured during the execution of a procedure.
Contact your administrator or helpdesk with the following info:
Prog: pwrtech.exe
Procedure: sharedPF8.fysnHasChildNodes
Error: (91) Object variable or With block variable not set
Machine: <machine name>
Program will resume normal operation...

This App-V package contains no shortcuts
for RES Workspace Manager to import.

This is a known issue with RES Workspace Manager 2012 SR4. RES is currently working on a fix.

Update 02-01-2014: This bug has been resolved in RES Workspace Manager 2012 SR4 Revision 3 (9.7.4.3), available upon customer request at RES Software. From the release notes:

"Microsoft App-V 5: Packages sequenced with Microsoft App-V 5 SP2 could not be imported in Console
Microsoft App-V 5.0 packages that were sequenced with Microsoft App-V 5 SP2 could not be imported in the RES Workspace Manager Console. This was caused by a change in the layout of Microsoft App-V 5 packages. When importing such packages (at Composition > Applications), the following error was displayed:

"Error (91) Object variable or With block variable not set" 

This has been resolved."

Workaround for those unable upgrade at this time

Packages that benefit from the added features of App-V 5.0 SP2, such as Internet Explorer plug-ins Java and Flash can be published (globally) to the client as they contain no shortcuts and require no interaction with RES Workspace Manager.
However, if you require a shortcut/application that has to be managed by RES Workspace Manager you should sequence the packages in App-V 5.0 SP1 or earlier versions. This means an application such as Adobe Reader which contains both a browser plug-in and an application may require two seperate packages. Alternatively you could to allow the App-V client to manage the shortcuts.
Copyright Dave Thijssen. Powered by Blogger.